<?php

// phpMyRealty 3
//
// File Name: footer.php
// File Location : ./admin/template/
//
// Copyright (c)2009 phpMyRealty.com
//
// e-mail: support@phpMyRealty.com

?>

<!-- Footer : start -->

<!-- Main Content table : stop -->
     </td>
    </tr>
   </table>

  </td>
 </tr>
</table>

<?php

// If logged we can start the page output
if (adminAuth($session->fetch('adminlogin'), $session->fetch('adminpassword')))
 {

	if (isset($announcement_check) || isset($version_check)) { ?>
	
	   <?php echo table_header ( $lang['Admin_Updates'] ); ?>
	   
		<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
		<tr>
			<td align="left" width="50%" valign="top">
	    
			<?php
			
			// Announcements check
			if (isset($announcement_check)) {
				$ch = curl_init('http://www.phpmyrealty.com/announcements');
				curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
				curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
				$announcement_in = curl_exec ($ch);
				curl_close($ch);
				if ($announcement_in != '') 
					echo '<b>phpMyRealty Announcements:</b><br />' . $announcement_in;
			}
	
			?>
			
			</td>
			<td align="right" width="50%" valign="top">
			
			<?php
	
			// Version check
			if (isset($version_check)) {
				$ch = curl_init('http://www.phpmyrealty.com/version');
				curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
				curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
				$version_in = curl_exec ($ch);
				curl_close($ch);
				if ($version_in != VERSION) 
					echo '<a href="http://www.phpmyrealty.com/news.html" style="padding:5px; color:white; background-color:red; font-weight: bold;">Upgrade Available! Version ' . $version_in . ' is now available.</a>';
				else
					echo 'No updates available.';
			}
	
			?>
			
			</td>
		</tr>
		</table>
		
		<?php echo table_footer(); ?>

	<?php } ?>

<?php } ?>

  </td>
 </tr>
</table>
    
<br /><br />
 
<?php include (PATH . '/includes/timings.php'); ?>
<br />
</span>

</div>

<br /><br />

<!-- Footer : end -->

</body>
</html>
<?php include ( PATH . '/includes/common_footer.php' ); ?>